package com.zhiyou.app.common.util;
import javax.servlet.http.HttpServletRequest;
import cn.hutool.extra.servlet.ServletUtil;

public class IPUtil {

    /**
     * 获取客户端IP地址
     * @param request HttpServletRequest对象
     * @return 客户端的IP地址
     */
    public static String getClientIP(HttpServletRequest request) {
        // 使用ServletUtil.getClientIP方法获取IP
        return ServletUtil.getClientIP(request);
    }
}

